<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Sets the default domain</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.ngettext.html">« ngettext</a></li>
      <li style="float: right;"><a href="book.iconv.html">iconv »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.gettext.html">Gettext 函数</a></li>
    <li>Sets the default domain</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.textdomain" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">textdomain</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">textdomain</span> &mdash; <span class="dc-title">Sets the default domain</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.textdomain-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>textdomain</strong></span>(<span class="methodparam"><span class="type">?</span><span class="type"><span class="type">string</span><span class="type"></span></span> <code class="parameter">$domain</code></span>): <span class="type">string</span></div>

  <p class="para rdfs-comment">
   This function sets the domain to search within when calls are
   made to <span class="function"><a href="function.gettext.html" class="function">gettext()</a></span>, usually the named after an
   application.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.textdomain-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">domain</code></dt>

     <dd>

      <p class="para">
       The new message domain, or <strong><code>null</code></strong> to get the current setting without
       changing it
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.textdomain-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   If successful, this function returns the current message
   domain, after possibly changing it.
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.textdomain-notes">
  <h3 class="title">注释</h3>
  <blockquote class="note"><p><strong class="note">注意</strong>: 
   <p class="para">
    The <span class="function"><strong>textdomain()</strong></span> information is maintained per process,
    not per thread.
   </p>
  </p></blockquote>
 </div>

</div></div></div></body></html>